/*
 * 详情页面样式文件 - Details Page Styles
 * 定义文章详情页面的布局、内容展示、响应式设计等样式
 */

.container {
  padding: 80px 20px 20px;
  max-width: 1500px;
  margin: 0 auto;
  min-height: calc(100vh - 160px);
}

// ==================== 简洁模式按钮样式 ====================

.simpleModeButton {
  width: 100%;
  height: 50px;
  background: #212121 !important;
  border: none !important;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease !important;
  
  svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transform: translateX(0) scale(1);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
    
    path {
      fill: #999;
      transition: fill 0.6s ease !important;
    }
  }
  
  span {
    font-size: 16px;
    font-weight: 600 !important;
    color: white !important;
    white-space: nowrap;
    opacity: 1;
    transform: translateX(0);
    // 非hover状态：文字延迟0.6s后再淡入（等扫帚完全移动回去）
    transition: opacity 0.5s ease 0.6s, transform 0.5s ease 0.6s;
  }
  
  &:hover {
    svg {
      transform: translateX(40px) scale(1.3);
      filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
      
      path {
        fill: white;
      }
    }
    
    span {
      opacity: 0;
      transform: translateX(10px);
      // hover状态：文字立即淡出，不延迟
      transition: opacity 0.4s ease 0s, transform 0.4s ease 0s;
    }
  }
  
  &:active {
    transform: scale(0.98) !important;
  }
}

.loadingContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

.errorContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  font-size: 16px;
}

.articleCard {
  margin-bottom: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 6%);
  transition: box-shadow 0.3s ease;

  &:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 10%);
  }

  .articleHeader {
    margin-bottom: 24px;

    .articleTitle {
      margin-bottom: 12px; // 再减少一点：16px → 12px
      color: #262626;
      font-weight: 600;
      line-height: 1.4;
    }

    .articleMeta {
      padding: 2px 0; 
      margin-bottom: 2px; 

      
      // 每个元信息项的悬停效果
      .ant-space-item > .ant-space {
        &:hover {
          transform: translateY(-3px) scale(1.03) !important;
          box-shadow: 0 8px 20px rgba(24, 144, 255, 0.25) !important;
          background: linear-gradient(135deg, rgba(240, 245, 255, 0.95), rgba(230, 240, 255, 1)) !important;
          border: 1px solid rgba(24, 144, 255, 0.3) !important;
        }
        
        // 悬停时图标动画
        &:hover .anticon {
          transform: scale(1.2) rotate(8deg) !important;
          filter: brightness(1.15) !important;
        }
      }
    }
  }

  .articleContent {
    font-size: 16px; // 恢复原来的字号
    line-height: 1.8;
    color: #262626;
    margin: 32px 0;

    // ==================== 标题样式 ====================

    // 所有标题的基础样式
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      margin: 24px 0 16px; // 默认间距：上24px 下16px
      color: #262626;
      font-weight: 600;
      position: relative;
    }

    // ==================== 二级标题 (h2) ====================
    h2 {
      margin: 12px 0 8px !important; // 上12px 下8px
      padding: 4px 8px;
      display: inline-block;
      position: relative;
      z-index: 1;
      line-height: 1.6;

      // 蓝色 # 符号
      &::before {
        content: '# ';
        color: #1890ff;
        opacity: 0.7;
        font-weight: 500;
        margin-right: 8px;
      }

      // 荧光笔高光背景
      &::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 70%; // 覆盖文字高度的70%
        transform: translateY(-50%); // 垂直居中
        z-index: -1;
        border-radius: 4px;
        opacity: 0.6;
        transition: all 0.3s ease;
      }

      // 荧光笔颜色变化（通过 nth-of-type 实现随机）
      // 默认浅黄色
      &::after {
        background: linear-gradient(
          100deg,
          rgba(255, 235, 59, 0.3) 0%,
          rgba(255, 235, 59, 0.4) 50%,
          rgba(255, 235, 59, 0.3) 100%
        );
      }

      // 每4个标题中的第1个：浅蓝色
      &:nth-of-type(4n+1)::after {
        background: linear-gradient(
          100deg,
          rgba(173, 216, 230, 0.3) 0%,
          rgba(135, 206, 250, 0.4) 50%,
          rgba(173, 216, 230, 0.3) 100%
        );
      }

      // 每4个标题中的第2个：浅绿色
      &:nth-of-type(4n+2)::after {
        background: linear-gradient(
          100deg,
          rgba(152, 251, 152, 0.3) 0%,
          rgba(144, 238, 144, 0.4) 50%,
          rgba(152, 251, 152, 0.3) 100%
        );
      }

      // 每4个标题中的第3个：浅粉色
      &:nth-of-type(4n+3)::after {
        background: linear-gradient(
          100deg,
          rgba(255, 182, 193, 0.3) 0%,
          rgba(255, 192, 203, 0.4) 50%,
          rgba(255, 182, 193, 0.3) 100%
        );
      }

      // 悬浮时高光增强
      &:hover::after {
        opacity: 0.75;
      }
    }

    // ==================== 三级标题 (h3) ====================
    h3 {
      margin: 10px 0 8px !important; // 上10px 下8px
      font-size: 1.3em; // 恢复原来的字号
    }

    p {
      margin: 16px 0;
      text-align: justify;
    }

    img {
      max-width: 100%;
      height: auto;
      border-radius: 8px;
      margin: 16px 0;
    }

    blockquote {
      border-left: 4px solid #1890ff;
      margin: 16px 0;
      background-color: #f8f9fa;
      padding: 16px;
      border-radius: 0 8px 8px 0;
    }

    // 行内代码保留灰色背景
    code {
      background-color: #f5f5f5;
      padding: 2px 6px;
      border-radius: 4px;
      font-family: var(--global-font) !important;
    }

    // pre 标签不要任何样式（代码块由 .codeBlock 控制）
    pre {
      background: none;
      padding: 0;
      margin: 0;
      border: none;
      box-shadow: none;

      code {
        background: none;
        padding: 0;
      }
    }

    // Markdown专用样式 - 优化表格和代码块显示
    .markdownTable {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      margin: 16px 0;
      border: 2px solid #d9d9d9;
      border-radius: 8px;
      overflow: hidden;
      background-color: #fff;

      th,
      td {
        border-right: 1px solid #d9d9d9;
        border-bottom: 1px solid #d9d9d9;
        padding: 12px 16px;
        text-align: left;
        vertical-align: middle;

        &:last-child {
          border-right: none;
        }
      }

      th {
        background-color: #f0f2f5;
        font-weight: 600;
        color: #262626;
        border-bottom: 2px solid #d9d9d9;
        position: sticky;
        top: 0;
        z-index: 1;
      }

      tbody {
        tr {
          &:nth-child(even) {
            background-color: #fafafa;
          }

          &:hover {
            background-color: #e6f7ff;
          }

          &:last-child {
            td {
              border-bottom: none;
            }
          }
        }
      }
    }

    .tableWrapper {
      overflow-x: auto;
      margin: 16px 0;
      border-radius: 8px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 6%);
    }

    // ==================== 代码块样式 ====================
    
    // 代码块外层容器
    .codeBlockWrapper {
      margin: 0px 0; // 上下间距
      border-radius: 8px;
      overflow: hidden;
    }

    // 代码块头部
    .codeBlockHeader {
      background-color: #2d2d2d;
      padding: 8px 16px; // 减少上下内边距：10px → 8px
      display: flex;
      align-items: center;
      
      // macOS 三个小圆圈
      &::before {
        content: '';
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background-color: #ff5f56; // 红色
        box-shadow: 
          20px 0 0 #ffbd2e,  // 黄色
          40px 0 0 #27c93f;  // 绿色
        margin-right: 60px;
      }

      .codeLanguage {
        color: #9cdcfe;
        font-size: 12px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
      }
    }

    // 代码块内容
    .codeBlock {
      background-color: #1e1e1e !important;
      color: #d4d4d4 !important;
      padding: 12px 16px !important;
      margin: 0;
      overflow-x: auto;
      font-family: var(--global-font) !important;
      font-size: 14px; // 恢复原来的字号
      line-height: 1.6;

      code {
        background: none !important;
        color: inherit !important;
        padding: 0 !important;
      }

      // YAML 语法高亮
      &[class*="language-yaml"],
      &[class*="language-yml"] {
        .hljs-attr {
          color: #79c0ff !important;
        }
        .hljs-string {
          color: #a5d6ff !important;
        }
        .hljs-literal {
          color: #ffa657 !important;
        }
        .hljs-number {
          color: #79c0ff !important;
        }
        .hljs-comment {
          color: #8b949e !important;
          font-style: italic;
        }
      }
    }

    // ==================== 代码块日夜模式适配 ====================
    
    // 夜间模式
    :global {
      [data-theme='dark'] {
        .codeBlockHeader {
          background-color: #1a1a1a !important;
        }
        
        .codeBlock {
          background-color: #0d1117 !important;
        }
      }
    }

    .inlineCode {
      background-color: #f1f3f4;
      color: #c7254e;
      padding: 3px 8px;
      border-radius: 4px;
      font-family: var(--global-font) !important;
      font-size: 0.9em;
      border: 1px solid #e1e4e8;
      font-weight: 500;
    }

    .imageWrapper {
      margin: 20px 0;
      text-align: center;
    }

    .markdownImage {
      max-width: 100%;
      height: auto;
      border-radius: 8px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 10%);
      transition: transform 0.3s ease;

      &:hover {
        transform: scale(1.02);
      }
    }

    .imageCaption {
      margin-top: 8px;
      font-size: 14px;
      color: #8c8c8c;
      font-style: italic;
    }

    .markdownLink {
      color: #1890ff;
      text-decoration: none;
      border-bottom: 1px solid transparent;
      transition: all 0.3s ease;

      &:hover {
        color: #40a9ff;
        border-bottom-color: #40a9ff;
      }
    }

    .markdownBlockquote {
      border-left: 4px solid #1890ff;
      background-color: #f8f9fa;
      padding: 16px 20px;
      margin: 16px 0;
      border-radius: 0 8px 8px 0;
      position: relative;

      &::before {
        content: '"';
        position: absolute;
        top: 8px;
        left: -2px;
        font-size: 48px;
        color: #1890ff;
        opacity: 0.3;
        font-family: var(--global-font) !important;
      }

      p {
        margin: 0;
        color: #595959;
        font-style: italic;
      }
    }

    .markdownList {
      margin: 16px 0;
      padding-left: 24px;

      li {
        margin: 8px 0;
        line-height: 1.6;

        &[data-task] {
          list-style: none;
          position: relative;
          padding-left: 24px;
          margin-left: -24px;

          &::before {
            content: '';
            position: absolute;
            left: 0;
            top: 6px;
            width: 16px;
            height: 16px;
            border: 2px solid #d9d9d9;
            border-radius: 3px;
            background-color: #fff;
          }

          &[data-task="x"]::before {
            background-color: #52c41a;
            border-color: #52c41a;
            background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="white"><path d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"/></svg>');
            background-repeat: no-repeat;
            background-position: center;
            background-size: 12px;
          }
        }
      }
    }

    .markdownParagraph {
      margin: 16px 0;
      line-height: 1.8;
      text-align: justify;
      color: #262626;
    }

  }

  .topTocCard {
    margin-bottom: 24px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #fafafa;

    .topTocContent {
      .topTocList {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 12px;

        .topTocItem {
          display: inline-block;
          padding: 6px 12px;
          background: white;
          border: 1px solid #d9d9d9;
          border-radius: 16px;
          color: #595959;
          font-size: 14px;
          cursor: pointer;
          transition: all 0.3s ease;

          &:hover {
            color: #1890ff;
            border-color: #1890ff;
            background: #f0f8ff;
            transform: translateY(-1px);
          }
        }
      }
    }
  }

  .articleActions {
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid #f0f0f0;

    .actionButton {
      border-radius: 20px;
      height: 40px;
      padding: 0 24px;
      font-weight: 500;
      transition: all 0.3s ease;

      &:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(24, 144, 255, 30%);
      }

      &.ant-btn-primary {
        background: linear-gradient(135deg, #1890ff, #40a9ff);
        border: none;

        &:hover {
          background: linear-gradient(135deg, #40a9ff, #1890ff);
        }
      }
    }
  }
}

.commentCard {
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 6%);
  transition: box-shadow 0.3s ease;

  &:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 10%);
  }

  .ant-card-head {
    border-bottom: 2px solid #f0f0f0;

    .ant-card-head-title {
      font-weight: 600;
      font-size: 18px;
    }
  }
}

// 侧边栏容器 - 使用 sticky 定位
.sidebarContainer {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-bottom: 20px;
  
  // 自定义滚动条样式（继承全局）
  &::-webkit-scrollbar {
    width: 6px;
  }
  
  &::-webkit-scrollbar-track {
    background: transparent;
  }
  
  &::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 3px;
    
    &:hover {
      background: #bfbfbf;
    }
  }
}

.sideCard {
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 6%);
  transition: all 0.3s ease;

  &:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 10%);
    transform: translateY(-2px);
  }

  .sideCardContent {
    .statItem {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 0;
      transition: all 0.3s ease;
      border-radius: 4px;
      margin: 0 -8px;
      padding-left: 8px;
      padding-right: 8px;

      &:hover {
        color: #1890ff;
        background-color: #f0f8ff;
        transform: translateX(2px);
      }
      
      // 评论项特殊样式（可点击）
      &[style*="cursor: pointer"] {
        &:hover {
          background-color: #e6f7ff;
          box-shadow: 0 2px 4px rgba(24, 144, 255, 0.1);
        }
        
        &:active {
          transform: scale(0.98);
        }
      }
    }
  }
}

// 目录样式
.tocContainer {
  padding: 0;
  padding-right: 8px;
  max-height: calc(100vh - 400px); // 动态高度，留出空间给文章信息框
  overflow-y: auto;
  overflow-x: hidden;
  
  // 平滑滚动
  scroll-behavior: smooth;
  
  // 目录滚动条样式（继承全局样式，自动渐入渐出）
  &::-webkit-scrollbar {
    width: 8px;
  }
  
  &::-webkit-scrollbar-track {
    background: #f0f5ff;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
  }
  
  &::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #69c0ff 0%, #1890ff 100%);
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, background 0.3s ease;
    
    &:hover {
      background: linear-gradient(180deg, #91d5ff 0%, #40a9ff 100%);
      opacity: 1;
    }
  }
  
  // 悬停或滚动时显示滚动条
  &:hover,
  &.scrolling {
    &::-webkit-scrollbar-track {
      opacity: 1;
    }
    
    &::-webkit-scrollbar-thumb {
      opacity: 1;
    }
  }
  
  // Firefox 滚动条
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  
  &:hover,
  &.scrolling {
    scrollbar-color: #1890ff #f0f5ff;
  }
  
  // 顶部和底部渐变遮罩效果（可选）
  position: relative;
  
  &::before,
  &::after {
    content: '';
    position: sticky;
    left: 0;
    right: 0;
    height: 20px;
    pointer-events: none;
    z-index: 1;
  }
  
  &::before {
    top: 0;
    background: linear-gradient(to bottom, #fff 0%, rgba(255, 255, 255, 0) 100%);
  }
  
  &::after {
    bottom: 0;
    background: linear-gradient(to top, #fff 0%, rgba(255, 255, 255, 0) 100%);
  }
}

.tocItem {
  margin-bottom: 2px;

  &.tocLevel1 {
    margin-bottom: 4px;
  }
}

.tocItemContent {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  border-left: 3px solid transparent;
  
  // 丝滑的过渡动画
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  
  // 背景色渐变动画
  &::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #e6f7ff 0%, #f0f9ff 100%);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    border-radius: 4px;
  }
  
  // 左边框动画效果
  &::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, #1890ff 0%, #40a9ff 100%);
    border-radius: 0 2px 2px 0;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
  }

  &:hover {
    background-color: #f0f8ff;
    transform: translateX(2px);
  }

  // 激活状态样式
  &.active {
    background-color: #e6f7ff;
    border-left-color: transparent;
    padding-left: 5px;
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15);
    
    &::before {
      width: 100%;
      animation: highlightPulse 1.2s ease-in-out;
    }
    
    &::after {
      height: 100%;
      opacity: 1;
      animation: borderSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .tocLink {
      color: #1890ff !important;
      font-weight: 600 !important;
    }

    .tocToggle {
      color: #1890ff;
    }
  }
}

.tocToggle {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  cursor: pointer;
  font-size: 10px;
  color: #666;
  
  // 丝滑的旋转和颜色过渡
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform: rotate(0deg);

  &:hover {
    color: #1890ff;
    background-color: #e6f7ff;
    border-radius: 2px;
  }

  &.expanded {
    transform: rotate(90deg);
  }
}

.tocLink {
  flex: 1;
  color: #666;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  user-select: none;
  position: relative;
  
  // 丝滑的过渡动画
  transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              font-weight 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  &:hover {
    color: #1890ff;
  }
}

.tocChildren {
  margin-left: 16px;
  border-left: 1px solid #f0f0f0;
  padding-left: 8px;
  animation: slide-down 0.3s ease;
}

@keyframes slide-down {
  from {
    opacity: 0;
    max-height: 0;
  }

  to {
    opacity: 1;
    max-height: 500px;
  }
}

// 高亮脉冲动画
@keyframes highlightPulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.9;
  }
}

// 边框滑入动画
@keyframes borderSlideIn {
  0% {
    height: 0;
    opacity: 0;
  }
  60% {
    height: 110%;
    opacity: 1;
  }
  100% {
    height: 100%;
    opacity: 1;
  }
}

.tocLevel1 {
  .tocLink {
    font-weight: 600;
    font-size: 16px; // 增大一号：14px → 16px
    color: #262626;
  }
  
  .tocItemContent {
    transition-duration: 0.35s;
  }
}

.tocLevel2 {
  .tocLink {
    font-weight: 500;
    font-size: 15px; // 增大一号：13px → 15px
    color: #595959;
  }
  
  .tocItemContent {
    transition-duration: 0.4s;
  }
}

.tocLevel3 {
  .tocLink {
    font-size: 14px; // 增大一号：12px → 14px
    color: #737373; // 稍微深色一点，但比二级标题浅
  }
  
  .tocItemContent {
    transition-duration: 0.45s;
    
    &.active {
      &::after {
        transition-duration: 0.5s;
      }
    }
  }
}

.tocLevel4 {
  .tocLink {
    font-size: 12px;
  }
}

.tocLevel5 {
  .tocLink {
    font-size: 11px;
  }
}

.tocLevel6 {
  .tocLink {
    font-size: 11px;
  }
}

/* 响应式设计 */
@media (max-width: 992px) {
  .container {
    padding: 60px 16px 20px;
  }

  .articleCard {
    .articleContent {
      font-size: 15px;
    }
  }
  
  // 中等屏幕调整目录高度
  .tocContainer {
    max-height: calc(100vh - 240px);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 40px 12px 20px;
  }

  .articleCard {
    .articleHeader {
      .articleTitle {
        font-size: 24px;
      }

      .articleMeta {
        .ant-space {
          flex-wrap: wrap;
        }
      }
    }

    .articleContent {
      font-size: 14px;
      line-height: 1.6;

      // 移动端Markdown样式优化
      .markdownTable {
        font-size: 12px;
        border: 1px solid #d9d9d9;

        th,
        td {
          padding: 8px 10px;
          border: 1px solid #d9d9d9;
        }

        th {
          background-color: #f0f2f5;
          font-weight: 600;
        }
      }

      .tableWrapper {
        margin: 12px -12px;
        padding: 0 12px;
        border-radius: 4px;
      }

      .codeBlock {
        font-size: 12px;
        padding: 16px !important;
        margin: 12px -12px;
        border-radius: 0 !important;
        background-color: #1e1e1e !important;
        color: #d4d4d4 !important;
        border: none !important; // 强制去除所有边框
        // border-left: 4px solid #1890ff;
        // border-right: 4px solid #1890ff;
      }

      .markdownImage {
        margin: 12px -12px;
        border-radius: 0;
        width: calc(100% + 24px);
      }

      .markdownBlockquote {
        margin: 12px -12px;
        padding: 12px 16px;
        border-radius: 0;

        &::before {
          font-size: 36px;
        }
      }

      h1,
      h2,
      h3,
      h4,
      h5,
      h6 {
        &:hover::after {
          display: none;
        }
      }
    }

    .articleActions {
      .ant-space {
        flex-direction: column;
        width: 100%;

        .actionButton {
          width: 100%;
          margin-bottom: 8px;
        }
      }
    }
  }
}

@media (max-width: 480px) {
  .container {
    padding: 20px 8px;
  }

  .articleCard {
    margin: 0 -8px 16px;
    border-radius: 0;

    .articleHeader {
      .articleTitle {
        font-size: 20px;
        line-height: 1.3;
      }

      .articleMeta {
        .ant-space {
          .ant-space-item {
            font-size: 12px;
          }
        }
      }
    }

    .articleContent {
      font-size: 13px;

      // 超小屏幕Markdown样式
      .markdownTable {
        font-size: 11px;
        border: 1px solid #d9d9d9;

        th,
        td {
          padding: 6px 8px;
          border: 1px solid #d9d9d9;
        }

        th {
          background-color: #f0f2f5;
          font-weight: 600;
        }
      }

      .codeBlock {
        font-size: 11px;
        padding: 12px !important;
        margin: 8px -8px;
        background-color: #1e1e1e !important;
        color: #d4d4d4 !important;
        border: none !important; // 强制去除所有边框
        // border-left: 3px solid #1890ff;
        // border-right: 3px solid #1890ff;

        code {
          word-break: break-all;
          color: inherit !important;
        }
      }

      .inlineCode {
        font-size: 0.8em;
        padding: 2px 6px;
        background-color: #f1f3f4;
        color: #c7254e;
        border: 1px solid #e1e4e8;
      }

      .markdownImage {
        margin: 8px -8px;
        width: calc(100% + 16px);
      }

      .markdownBlockquote {
        margin: 8px -8px;
        padding: 8px 12px;

        &::before {
          font-size: 24px;
          top: 4px;
        }
      }

      h1 {
        font-size: 20px;
      }

      h2 {
        font-size: 18px;
      }

      h3 {
        font-size: 16px;
      }

      h4 {
        font-size: 15px;
      }

      h5 {
        font-size: 14px;
      }

      h6 {
        font-size: 13px;
      }
    }
  }

  .commentCard {
    margin: 0 -8px;
    border-radius: 0;
  }

  .sideCard {
    display: none; // 超小屏幕隐藏侧边栏
  }
}